<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>版位列表</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" href="/Public/admin/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/css/personal.css" media="all">
</head>
<body>
<section class="layui-larry-box">
	<div class="larry-personal">
	    <div class="layui-tab">
            <blockquote class="layui-elem-quote mylog-info-tit">
                <ul class="layui-tab-title">
		    	          <li class="layui-btn layui-this"><i class="layui-icon">&#xe60a;</i>版位列表</li>
		    	          <li class="layui-btn "><i class="layui-icon">&#xe63c;</i>添加版位</li>
		            </ul>
            </blockquote>
            <div class="larry-separate"></div>
		    <div class="layui-tab-content larry-personal-body clearfix mylog-info-box">
      <div class="layui-tab-item layui-field-box layui-show">
           <table class="layui-table table-hover" lay-even="" lay-skin="nob">
              <thead>
                <tr>
                  <th>ID</th>
                  <th>版位名称</th>
                  <th>版位尺寸</th>
                  <th>版位描述</th>
                  <th>管理操作</th>
                </tr>
              </thead>
              <tbody>
                <?php if(is_array($bw_list)): $i = 0; $__LIST__ = $bw_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$bw_list): $mod = ($i % 2 );++$i;?><tr>
                    <!-- <td><input type="checkbox"></td> -->
                    <td><?php echo ($bw_list['id']); ?></td>
                    <td><?php echo ($bw_list['title']); ?></td>
                    <td><?php echo ($bw_list['width']); ?>px&nbsp;*&nbsp;<?php echo ($bw_list['height']); ?>px</td>
                    <td><?php echo ($bw_list['description']); ?></td>
                    <td>
                        <a href="/admin/ad/index/id/<?php echo ($bw_list['id']); ?>" class="layui-btn layui-btn-small layui-btn-danger">广告列表</a>
                        <a href="/admin/adp/edit/id/<?php echo ($bw_list['id']); ?>" class="layui-btn layui-btn-small">修改</a>
                        <a href="/admin/adp/delete/id/<?php echo ($bw_list['id']); ?>" class="layui-btn layui-btn-small layui-btn-danger">删除</a>
                        <a href="/admin/ad/add/pid/<?php echo ($bw_list['id']); ?>" class="layui-btn layui-btn-small">添加广告</a></td>
                  </tr><?php endforeach; endif; else: echo "" ;endif; ?>
              </tbody>
           </table>
			    </div>
			     <!-- 添加版位 -->
			    <div class="layui-tab-item layui-field-box">
			      <form class="layui-form col-lg-5" action="/admin/adp/add" method="post">
              <div class="layui-form-item">
                <label class="layui-form-label">版位名称</label>
                <div class="layui-input-block">  
                  <input type="text" name="title"  lay-verify="required" autocomplete="off"  placeholder="请输入" class="layui-input" >
                </div>
              </div>
             <!--  <div class="layui-form-item">
                <label class="layui-form-label">版位类型</label>
                <div class="layui-input-block">
                  <input type="text" name="type"  autocomplete="off" placeholder="请输入" class="layui-input" >
                </div>
              </div> -->
              <div class="layui-form-item">
                <label class="layui-form-label">版位尺寸：宽</label>
                <div class="layui-input-block">
                  <input type="text" name="width" lay-verify="number" placeholder="请输入,单位px" autocomplete="off" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label">版位尺寸：高</label>
                <div class="layui-input-block">
                  <input type="text" name="height" lay-verify="number" placeholder="请输入，单位px" autocomplete="off" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">版位描述</label>
                <div class="layui-input-block">
                  <textarea name="description" placeholder="既然选择了远方，便只顾风雨兼程；路漫漫其修远兮，吾将上下而求索" value="" class="layui-textarea"></textarea>
                </div>
              </div>
              
              <div class="layui-form-item">
                <div class="layui-input-block">
                  <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
              </div>
            </form>
			    </div>
		    </div>
		</div>
	</div>
</section>
<script type="text/javascript" src="/Public/admin/layui/layui.js"></script>
<script type="text/javascript">
	layui.use(['jquery','layer','element','laypage'],function(){
	      window.jQuery = window.$ = layui.jquery;
	      window.layer = layui.layer;
          var element = layui.element(),
              laypage = layui.laypage;

            
          laypage({
					cont: 'page',
					pages: 10 //总页数
						,
					groups: 5 //连续显示分页数
						,
					jump: function(obj, first) {
						//得到了当前页，用于向服务端请求对应数据
						var curr = obj.curr;
						if(!first) {
							//layer.msg('第 '+ obj.curr +' 页');
						}
					}
				});

          laypage({
					cont: 'page2',
					pages: 10 //总页数
						,
					groups: 5 //连续显示分页数
						,
					jump: function(obj, first) {
						//得到了当前页，用于向服务端请求对应数据
						var curr = obj.curr;
						if(!first) {
							//layer.msg('第 '+ obj.curr +' 页');
						}
					}
				});
    });

  layui.use(['form','upload'],function(){
         var form = layui.form();
         layui.upload({ 
             url: '' ,//上传接口 
             success: function(res){
              //上传成功后的回调 
              console.log(res) 
            } 
         });
  });
</script>
</body>
</html>